package com.Shop.Center.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

//订单实体类
public class ItemOrder {
    @TableId("order_id")
    private Long orderId;
    private String orderNo;
    private Long userId;
    private Double totalPrice;
    private char payStatus; //0表示待支付，1表示支付中，2表示已支付
    private char payType;
    private Date payTime;
    private char orderStatus;   //0表示待支付，1表示已支付，2表示配货，3表示已出库，4表示交易成功，-1表示订单关闭
    private String extraInfo;
    private String userAddress;
    private char isDeleted;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    public ItemOrder(){}

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public char getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(char payStatus) {
        this.payStatus = payStatus;
    }

    public char getPayType() {
        return payType;
    }

    public void setPayType(char payType) {
        this.payType = payType;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public char getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(char orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getExtraInfo() {
        return extraInfo;
    }

    public void setExtraInfo(String extraInfo) {
        this.extraInfo = extraInfo;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public char getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(char isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "ItemOrder{" +
                "orderId=" + orderId +
                ", orderNo='" + orderNo + '\'' +
                ", userId=" + userId +
                ", totalPrice=" + totalPrice +
                ", payStatus=" + payStatus +
                ", payType=" + payType +
                ", payTime=" + payTime +
                ", orderStatus=" + orderStatus +
                ", extraInfo='" + extraInfo + '\'' +
                ", userAddress='" + userAddress + '\'' +
                ", isDeleted=" + isDeleted +
                ", createTime=" + createTime +
                '}';
    }
}
